<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="icon" href="http://b-gold-cdn.xitu.io/favicons/v2/favicon.ico" type="image/x-icon" />
    <title><%= title %></title>
    <link href="/public/css/index.css?t=20181203" rel="stylesheet">
</head>

<body>
    <div id="app" @click="closeUserInfo">
    <% if (typeof type == 'undefined') { %>
    <header>
        <div class="container">
            <div class="u_logo">
                <a href="/">
                <img src="/public/img/832d23ef4b8cf6372d4184dbdbb1b5eb.png" alt="">
            </a>
             </div>
            <% if (user) { %>
              <a href="javascript:;" class="u_head" @click.stop="switchUserInfo">
                    <% if (user.head) { %>
                        <img  title="<%= user.name %>" src="<%= user.head%>" alt=""> 
                    <% }else{ %>
                        <img  title="<%= user.name %>" src="/public/img/4965961f1ece63cde79fcf66f9f747c7.png" data-u="<%= user.head%>" alt=""> 
                    <% } %>
              </a>
              <div class="u_use_ctr" v-show="isShowUserInfo">
                    <ul>
                        <li>
                            <a href="/post">写文章</a>
                        </li>
                        <li>
                            <a href="/u/<%= user.name %>">我的主页</a>
                        </li>
                        <li>
                            <a href="/filelist">图片空间</a>
                        </li>
                        <li>
                            <a href="/logout">登出</a>
                        </li>
                    </ul>
                </div>
              <% } else { %>
                <a href="/login" class="u_head">
                    <img style="width:40%;" src=""
                    alt="">
                </a>
              <% } %>
        </div>
    </header>
    <% } %>